package cate.game.pvp.pointrace;

import cp.solution.define.SrvType;
import cate.game.framework.advanced.AbstractAdvancedModule;
import cate.game.pvp.pointrace.data.PointRacePs;
import cate.game.role.pvp.PvpRecord;
import lombok.Data;

import java.time.Duration;
import java.util.List;

import static cate.game.pvp.pointrace.PointRaceManager.MODULE_NAME;

public class PointRaceMessagingModule extends AbstractAdvancedModule {

    public static final Duration TIMEOUT = Duration.ofSeconds(2);
    public PointRaceMessagingModule() {
        super(MODULE_NAME, SrvType.cross);
    }

    public void gmOperation(int operation) {

    }

    public void gmClearData() {

    }

    public void gmAddRobot(List<PointRacePs> psList) {

    }


    @Data
    public static class PushRdMessage {
        private String uid;
        private PvpRecord record;

        public static PushRdMessage of(String uid, PvpRecord record) {
            PushRdMessage msg = new PushRdMessage();
            msg.setUid(uid);
            msg.setRecord(record);
            return msg;
        }
    }

}
